<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>MVVM</title>
</head>
<body>
  <div id="app">
    <input type="text" v-model="language.name">
    <div>{{language.name}} 分割线 {{language.version}}</div>
    <div>{{language.version}}</div>
    "computed": {{getCurrentName}}
    <ul>
      <li>1</li>
      <li>2</li>
    </ul>
    <button v-on:click="change">修改名称</button>
    <div v-html="message" />
  </div>

  <script src="script/index.js"></script>
  <!-- <script src="./node_modules/vue/dist/vue.min.js"></script> -->
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        language: {
          name: "Vue",
          version: '2.6.14'
        },
        message: '<h1>hello Vue</h1>'
      },
      methods: {
        change() {
          this.language.name = 'React'
        }
      },
      computed: {
        getCurrentName() {
          return this.language.name
        }
      }
    })
  </script>
</body>
</html>